#include "CColliableEffect.h"

CColliableEffect::CColliableEffect() : CEffect()
{

}

CColliableEffect::CColliableEffect(float Xpos, float Ypos, float deep, float XVelocity, float YVelocity, int width, int height) : CEffect( Xpos , Ypos , deep , XVelocity , YVelocity , width , height )
{
	
}


CColliableEffect::~CColliableEffect()
{

}



void CColliableEffect::Update(float deltaTime)
{
	float moveX;
	float moveY;

	m_fDeltaTime += deltaTime;
	if( m_fDeltaTime >= m_fTimeLife )
		SetAlive( false );

	moveX = GetXVelocity() * deltaTime; 
	moveY = GetYVelocity() * deltaTime;
	Move( moveX , moveY );

	GetSprite()->Update( deltaTime );
}


